<html dir="ltr" lang="en">
<head>
  <meta charset="utf-8">
  <title>Blockly Maze</title>
  <link rel="stylesheet" type="text/css" href="style.css">
  <script type="text/javascript" src="/storage.js"></script>
  <script type="text/javascript" src="../_soy/soyutils.js"></script>
  <script type="text/javascript" src="template.js"></script>
  <script>
    var MSG = {
      // Block text.
      moveForward: 'move forward',
      move: 'move',
      forward: 'forward',
      backward: 'backward',
      turn: 'turn',
      left: 'left',
      right: 'right',
      randomly: 'randomly',
      path: 'path',
      ifPath: 'if path',
      do: 'do',
      else: 'else',
      ahead: 'ahead',
      toTheLeft: 'to the left',
      toTheRight: 'to the right',
      behind: 'behind',
      repeatUntilFinished: 'repeat until finished',
      getX: 'get X position',
      getY: 'get Y position',
      getDirection: 'get direction',
      // Tooltips.
      moveForwardTooltip: 'Moves Pegman forward one space.',
      moveTooltip: 'Moves Pegman forward or backward one space.',
      turnTooltip: 'Turns Pegman left or right by 90 degrees.',
      ifTooltip: 'If there is a path in the specified direction,\n' +
          'then do some actions.',
      ifelseTooltip: 'If there is a path in the specified direction,\n' +
          'then do the first block of actions.\n' +
          'Otherwise, do the second block of actions.',
      whileTooltip: 'Repeat the enclosed actions until finish point is reached.',
      isPathTooltip: 'Returns true if there is a path\n' +
          'in the specified direction.',
      getXTooltip: 'Returns Pegman\'s horizontal position.\n' +
          'Left edge is 1, right edge is 8.',
      getYTooltip: 'Returns Pegman\'s vertical position.\n' +
          'Top edge is 1, bottom edge is 8.',
      getDirectionTooltip: 'Retuns Pegman\'s direction.\n' +
          'North: 0, East: 1, South: 2, West: 3.',
      codeTooltip: 'See generated JavaScript code.',
      linkTooltip: 'Save and link to blocks.',
      randomizeTooltip1: 'Randomize start and finish markers.',
      randomizeTooltip2: 'Randomize maze.',  // Not currently used.
      // Level hints.
      hints: [undefined, // There is no level 0.
        "A program is a sequence of statements.  Stack a couple of 'move forward' blocks together to help me reach the goal.",
        "What is the sequence of steps to follow this path?",
        "Computers have limited memory.  Reach the end of this path using only two blocks.  Use 'repeat' to run a block more than once.",
        "Reach the goal using only five blocks.",
        "Pegman will have to turn left when he cannot go straight.",
        "An 'if' condition will do something only if the condition is true.  Try turning left if there is a path to the left.",
        "This maze looks more complicated than the previous one, but it is not.",
        "You can use more than one 'if' statement.",
        "If-else statements will do one thing or the other.",
        "Can you solve this complicated maze?  Try following the left-hand wall."],
      // Misc text.
      level: 'Level',
      capacity0: 'You have <span id="capacityNumber">0</span> blocks left.',
      capacity1: 'You have <span id="capacityNumber">1</span> block left.',
      capacity2: 'You have <span id="capacityNumber">%1</span> blocks left.',
      runProgram: 'Run Program',
      resetProgram: '\u00A0 \u00A0 Reset \u00A0 \u00A0',
      nextLevel: 'Congratulations!\nAre you ready to proceed to level %1?',
      finalLevel: 'Congratulations!\nYou have solved the final level.',
      title: 'Maze',
      oneTopBlock: 'On this level, you need to stack together all of the blocks in the white workspace.'
    };
    if ('BlocklyStorage' in window) {
      BlocklyStorage.HTTPREQUEST_ERROR = 'There was a problem with the request.\n';
      BlocklyStorage.LINK_ALERT = 'Share your blocks with this link:\n\n';
      BlocklyStorage.HASH_ERROR = 'Sorry, "%1" doesn\'t correspond with any saved Blockly file.';
      BlocklyStorage.XML_ERROR = 'Could not load your saved file.\n'+
          'Perhaps it was created with a different version of Blockly?\nXML: ';
    }
    var languageSrc = ['en/_messages.js'];
  </script>
</head>
<body>
  <script type="text/javascript" src="maze.js"></script>
</body>
</html>
